package insert

// 从 excel 中读取单元格

import (
	"fmt"

	"github.com/tealeg/xlsx"
)

// 读取 excel 单元格的数据，以字符串形式输出
func readFormExcel() {
	excelFileName := "aa.xlsx"
	xlFile, err := xlsx.OpenFile(excelFileName)
	if err != nil {

	}
	count := 0
	sheet := xlFile.Sheets[7]
	i := 0
	for i = 0; i < 5; i++ {
		for _, row := range sheet.Rows {
			if len(row.Cells) > i {
				cell := row.Cells[i]
				str, _ := cell.String()
				if str != "" {
					count++
					fmt.Printf("\"%s\",", str)
				}
			}
		}
	}
}
